package com.yl.project.lvyou.record.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yl.framework.aspectj.lang.annotation.Excel;
import javax.persistence.*;
import com.yl.framework.web.domain.BaseEntity;
import java.util.Date;

/**
 * 支付记录对象 payment_record
 * 
 * @author yl
 * @date 2025-03-15
 */
@Table(name="payment_record")
public class PaymentRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 支付记录ID */
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    /** 订单编号 */
    @Excel(name = "订单编号")

    @Column(name = "order_no")
    private String orderNo;
    /** 用户ID */
    @Excel(name = "用户ID")

    @Column(name = "user_id")
    private Long userId;
    /** 支付金额 */
    @Excel(name = "支付金额")

    @Column(name = "payment_amount")
    private Double paymentAmount;
    /** 支付方式 */
    @Excel(name = "支付方式")

    @Column(name = "payment_method")
    private String paymentMethod;
    /** 交易流水号 */
    @Excel(name = "交易流水号")

    @Column(name = "transaction_id")
    private String transactionId;
    /** 支付状态：0-处理中，1-成功，2-失败 */
    @Excel(name = "支付状态：0-处理中，1-成功，2-失败")

    @Column(name = "payment_status")
    private Integer paymentStatus;
    /** 支付时间 */
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")

    @Column(name = "payment_time")
    private Date paymentTime;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setPaymentAmount(Double paymentAmount) 
    {
        this.paymentAmount = paymentAmount;
    }

    public Double getPaymentAmount() 
    {
        return paymentAmount;
    }
    public void setPaymentMethod(String paymentMethod) 
    {
        this.paymentMethod = paymentMethod;
    }

    public String getPaymentMethod() 
    {
        return paymentMethod;
    }
    public void setTransactionId(String transactionId) 
    {
        this.transactionId = transactionId;
    }

    public String getTransactionId() 
    {
        return transactionId;
    }
    public void setPaymentStatus(Integer paymentStatus) 
    {
        this.paymentStatus = paymentStatus;
    }

    public Integer getPaymentStatus() 
    {
        return paymentStatus;
    }
    public void setPaymentTime(Date paymentTime) 
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime() 
    {
        return paymentTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNo", getOrderNo())
            .append("userId", getUserId())
            .append("paymentAmount", getPaymentAmount())
            .append("paymentMethod", getPaymentMethod())
            .append("transactionId", getTransactionId())
            .append("paymentStatus", getPaymentStatus())
            .append("paymentTime", getPaymentTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
